package request

import (
	"gitee.com/cjsn/topsdk/util"
)

type TmallServicecenterWorkcardLogisticsinfoUpdateRequest struct {
	/*
	   create, pickup_finished 揽收完成， signed 签收     */
	StatusCode *string `json:"status_code" required:"true" `
	/*
	   外部单据id     */
	OuterId *string `json:"outer_id,omitempty" required:"false" `
	/*
	   物流单id     */
	LogisticsOrderId *int64 `json:"logistics_order_id" required:"true" `
	/*
	   物流单号     */
	ExpressCode *string `json:"express_code,omitempty" required:"false" `
	/*
	   物流公司     */
	ExpressCompany *string `json:"express_company,omitempty" required:"false" `
	/*
	   快递员手机号     */
	CourierMobile *string `json:"courier_mobile,omitempty" required:"false" `
	/*
	   快递员名称     */
	CourierName *string `json:"courier_name,omitempty" required:"false" `
	/*
	   扩展信息     */
	ExtendInfo *map[string]interface{} `json:"extend_info,omitempty" required:"false" `
	/*
	   揽收完成时间     */
	PickupFinishTime *util.LocalTime `json:"pickup_finish_time,omitempty" required:"false" `
	/*
	   揽收上门确认时间     */
	PickupDoorTime *util.LocalTime `json:"pickup_door_time,omitempty" required:"false" `
	/*
	   签收时间     */
	SignTime *util.LocalTime `json:"sign_time,omitempty" required:"false" `
}

func (s *TmallServicecenterWorkcardLogisticsinfoUpdateRequest) SetStatusCode(v string) *TmallServicecenterWorkcardLogisticsinfoUpdateRequest {
	s.StatusCode = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsinfoUpdateRequest) SetOuterId(v string) *TmallServicecenterWorkcardLogisticsinfoUpdateRequest {
	s.OuterId = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsinfoUpdateRequest) SetLogisticsOrderId(v int64) *TmallServicecenterWorkcardLogisticsinfoUpdateRequest {
	s.LogisticsOrderId = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsinfoUpdateRequest) SetExpressCode(v string) *TmallServicecenterWorkcardLogisticsinfoUpdateRequest {
	s.ExpressCode = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsinfoUpdateRequest) SetExpressCompany(v string) *TmallServicecenterWorkcardLogisticsinfoUpdateRequest {
	s.ExpressCompany = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsinfoUpdateRequest) SetCourierMobile(v string) *TmallServicecenterWorkcardLogisticsinfoUpdateRequest {
	s.CourierMobile = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsinfoUpdateRequest) SetCourierName(v string) *TmallServicecenterWorkcardLogisticsinfoUpdateRequest {
	s.CourierName = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsinfoUpdateRequest) SetExtendInfo(v map[string]interface{}) *TmallServicecenterWorkcardLogisticsinfoUpdateRequest {
	s.ExtendInfo = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsinfoUpdateRequest) SetPickupFinishTime(v util.LocalTime) *TmallServicecenterWorkcardLogisticsinfoUpdateRequest {
	s.PickupFinishTime = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsinfoUpdateRequest) SetPickupDoorTime(v util.LocalTime) *TmallServicecenterWorkcardLogisticsinfoUpdateRequest {
	s.PickupDoorTime = &v
	return s
}
func (s *TmallServicecenterWorkcardLogisticsinfoUpdateRequest) SetSignTime(v util.LocalTime) *TmallServicecenterWorkcardLogisticsinfoUpdateRequest {
	s.SignTime = &v
	return s
}

func (req *TmallServicecenterWorkcardLogisticsinfoUpdateRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.StatusCode != nil {
		paramMap["status_code"] = *req.StatusCode
	}
	if req.OuterId != nil {
		paramMap["outer_id"] = *req.OuterId
	}
	if req.LogisticsOrderId != nil {
		paramMap["logistics_order_id"] = *req.LogisticsOrderId
	}
	if req.ExpressCode != nil {
		paramMap["express_code"] = *req.ExpressCode
	}
	if req.ExpressCompany != nil {
		paramMap["express_company"] = *req.ExpressCompany
	}
	if req.CourierMobile != nil {
		paramMap["courier_mobile"] = *req.CourierMobile
	}
	if req.CourierName != nil {
		paramMap["courier_name"] = *req.CourierName
	}
	if req.ExtendInfo != nil {
		paramMap["extend_info"] = util.ConvertStruct(*req.ExtendInfo)
	}
	if req.PickupFinishTime != nil {
		paramMap["pickup_finish_time"] = *req.PickupFinishTime
	}
	if req.PickupDoorTime != nil {
		paramMap["pickup_door_time"] = *req.PickupDoorTime
	}
	if req.SignTime != nil {
		paramMap["sign_time"] = *req.SignTime
	}
	return paramMap
}

func (req *TmallServicecenterWorkcardLogisticsinfoUpdateRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
